package threadTest;

/**
 * @author wangchenghao
 * @date 2021/7/31
 **/
public class newTest {
    public class Sp{
        int flag=1;
        Sp(){
            test();
        }
        public void test(){
            System.out.println("sp.test"+flag);
        }
    }
    public class Son extends Sp{
        Son(int i){
            flag=i;
            System.out.println("son.sub"+flag);
        }
        @Override
        public void test(){
            System.out.println("son.test"+flag);
        }
    }

    public static void main(String[] args) {
        new newTest().new Son(5);
    }
}
